package com.ruoyi.hatha.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hatha.mapper.PYuangongMapper;
import com.ruoyi.hatha.domain.PYuangong;
import com.ruoyi.hatha.service.IPYuangongService;

/**
 * 员工管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-02
 */
@Service
public class PYuangongServiceImpl implements IPYuangongService 
{
    @Autowired
    private PYuangongMapper pYuangongMapper;

    /**
     * 查询员工管理
     * 
     * @param id 员工管理主键
     * @return 员工管理
     */
    @Override
    public PYuangong selectPYuangongById(Long id)
    {
        return pYuangongMapper.selectPYuangongById(id);
    }

    /**
     * 查询员工管理列表
     * 
     * @param pYuangong 员工管理
     * @return 员工管理
     */
    @Override
    public List<PYuangong> selectPYuangongList(PYuangong pYuangong)
    {
        return pYuangongMapper.selectPYuangongList(pYuangong);
    }

    /**
     * 新增员工管理
     * 
     * @param pYuangong 员工管理
     * @return 结果
     */
    @Override
    public int insertPYuangong(PYuangong pYuangong)
    {
        pYuangong.setCreateTime(DateUtils.getNowDate());
        return pYuangongMapper.insertPYuangong(pYuangong);
    }

    /**
     * 修改员工管理
     * 
     * @param pYuangong 员工管理
     * @return 结果
     */
    @Override
    public int updatePYuangong(PYuangong pYuangong)
    {
        return pYuangongMapper.updatePYuangong(pYuangong);
    }

    /**
     * 批量删除员工管理
     * 
     * @param ids 需要删除的员工管理主键
     * @return 结果
     */
    @Override
    public int deletePYuangongByIds(Long[] ids)
    {
        return pYuangongMapper.deletePYuangongByIds(ids);
    }

    /**
     * 删除员工管理信息
     * 
     * @param id 员工管理主键
     * @return 结果
     */
    @Override
    public int deletePYuangongById(Long id)
    {
        return pYuangongMapper.deletePYuangongById(id);
    }
}
